package figuras;

import strategy.CalculoStrategy;
import composite.FiguraAbstrata;

public class Triangulo extends FiguraAbstrata{
	
	private CalculoStrategy calculoStrategy;
	private Reta reta1;
	private Reta reta2;
	private Reta reta3;
	
	
	public Triangulo() {
		super();
	}
	public Triangulo(Reta reta1, Reta reta2, Reta reta3, CalculoStrategy calculoStrategy) {
		super();
		this.reta1 = reta1;
		this.reta2 = reta2;
		this.reta3 = reta3;
	}
	public double calcularArea(){
		return calculoStrategy.calcularArea(this);
	} 
	public double calcularPerimetro(){
		return calculoStrategy.calcularPerimetro(this);
	}
	public Reta getReta1() {
		return reta1;
	}
	public void setReta1(Reta reta1) {
		this.reta1 = reta1;
	}
	public Reta getReta2() {
		return reta2;
	}
	public void setReta2(Reta reta2) {
		this.reta2 = reta2;
	}
	public Reta getReta3() {
		return reta3;
	}
	public void setReta3(Reta reta3) {
		this.reta3 = reta3;
	}
	@Override
	public String toString() {
		return "Triangulo reta1=" + reta1 + ", reta2=" + reta2 + ", reta3=" + reta3;
	}
	
	
}